from ronglian_sms_sdk import SmsSDK

accId = "8aaf070875774c6d017577e8d7b30055"
accToken = "b684492e3414473b98b266504b73a31c"
appId = "8aaf070875774c6d017577e8d8cd005b"


def send_message(mobile, code, time):
    '''

    :param mobile: 手机号
    :param code: 验证码
    :param time: 分钟
    :return:
    '''
    sdk = SmsSDK(accId, accToken, appId)
    tid = "1"
    mobile = mobile
    datas = (code, time)
    resp = sdk.sendMessage(tid, mobile, datas)
    print(resp)


if __name__ == '__main__':
    # 【云通讯】您的验证码是6666，请于5分钟内正确输入
    send_message("15147474523", "6666", "5")
